# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=lager
pkgver=0.1.1
pkgrel=1
pkgdesc="C++ library for value-oriented design using the unidirectional data-flow architecture"
url="https://sinusoid.es/lager"
arch="noarch"
license="BSL-1.0"
makedepends="
	boost-dev
	catch2
	cmake
	immer
	samurai
	zug
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/arximboldi/lager/archive/refs/tags/v$pkgver.tar.gz"
options="!check" # Calls test executables unconditionally if they have been built or not

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-Dlager_BUILD_EXAMPLES=OFF \
		-Dlager_BUILD_DEBUGGER_EXAMPLES=OFF
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
f88f22dbe1d0e099b1c1f0d8b165c155c44db61a51297ca445d82db8ed4efb918016678a5d6977147214540c69b72f7364d0d14ddc7f300625c19553c88a4e39  lager-0.1.1.tar.gz
"
